import Vue from 'vue';
import Btable from 'components/Btable.vue'
import Bpagination from 'components/Bpagination.vue'
import BdatePicker from 'components/BdatePicker.vue'
import ECharts from 'components/ECharts.vue'
import UploadImage from 'components/UploadImage.vue'
import UploadFile from 'components/UploadFile.vue'
import CommonInput from 'components/CommonInput.vue'

import element from 'utils/element'



const components = Object.assign(element,{
    Btable,
    Bpagination,
    BdatePicker,
    ECharts,
    UploadImage,
    UploadFile,
    CommonInput,
})

Object.keys(components).forEach(item => {
    if(item === 'Loading'){
      Vue.use(components[item].directive);
      Vue.prototype.$loading = components[item].service;
    }else{
      Vue.component(components[item].name, components[item]);
    }
});
